package cn.starrysky108.simpleerp.product.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import cn.starrysky108.simpleerp.core.enums.StoreActivityTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * <p>
 * 商品SPU表
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("product_spu")
@ApiModel(value = "ProductSpu对象", description = "商品SPU表")
public class ProductSpu extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "商品编号(保留字段)")
    @TableField("sn")
    private String sn;

    @ApiModelProperty(value = "供应商")
    @TableField("provider_id")
    private Long providerId;

    @ApiModelProperty(value = "商品类型")
    @TableField("type_id")
    private Long typeId;

    @ApiModelProperty(value = "一级商品分类")
    @TableField("first_category")
    private Long firstCategory;

    @ApiModelProperty(value = "二级商品分类")
    @TableField("second_category")
    private Long secondCategory;

    @ApiModelProperty(value = "三级商品分类分类")
    @TableField("third_category")
    private Long thirdCategory;

    @ApiModelProperty(value = "全部规格参数数据json")
    @TableField("specifications")
    private String specifications;

    @ApiModelProperty(value = "特有规格参数及可选值信息(json数据)")
    @TableField("spec_template")
    private String specTemplate;

    @ApiModelProperty(value = "商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "单位")
    @TableField("unit_name")
    private String unitName;

    @ApiModelProperty(value = "关键词(;分割)")
    @TableField("keywords")
    private String keywords;

    @ApiModelProperty(value = "条形码")
    @TableField("bar_code")
    private String barCode;

    @ApiModelProperty(value = "价格区间(;分割)")
    @TableField("price_range")
    private String priceRange;

    @ApiModelProperty(value = "商品展示照片(;分割)")
    @TableField("photos")
    private String photos;

    @ApiModelProperty(value = "销量")
    @TableField("sale_count")
    private Integer saleCount;

    @ApiModelProperty(value = "营业额")
    @TableField("revenue")
    private BigDecimal revenue;

    @ApiModelProperty(value = "详情页url")
    @TableField("url_content")
    private String urlContent;

    @ApiModelProperty(value = "是否上架，默认true")
    @TableField("is_on_sale")
    private Boolean isOnSale;

    @ApiModelProperty(value = "是否是虚拟商品，默认false")
    @TableField("is_virtual")
    private Boolean isVirtual;

    @ApiModelProperty(value = "参加的活动类型")
    @TableField("activity_type")
    private StoreActivityTypeEnum activityType;

    @ApiModelProperty(value = "活动id")
    @TableField("activity_id")
    private Integer activityId;



}
